#pragma once

#include "math.h"
#include "graphics.h"


class IVertex2;
class IStackAllocator;


class DebugRendererGL : public IRenderer
{
public:
	DebugRendererGL(Scalar tolerance, IStackAllocator& stack);
	virtual void render(const IBounded2& domain, const Vector2& translation);

private:
	void renderFill(const IBounded2& domain, const Vector2& translation);
	void renderWire(const IBounded2& domain, const Vector2& translation);

	void renderVertices(const IBounded2& domain);
	void renderHeadVertex(const IBounded2& domain);
	void renderVertex(const Vector2& point);

private:
	Scalar tolerance_;
	IStackAllocator*	stack_;
};